<?php
namespace app\zmt\validata;

use think\Validate;

class NavValidata extends Validate
{
    protected $rule = [
        'title' => 'require|max:20',
        'id' => 'require|integer',

    ];
    protected $message = [
        'title.require' => '标题不能为空',
        'title.max' => '标题不能超过20个字',
        'id.require' => '参数错误',
        'id.integer' => '参数类型错误',

    ];
    protected $scene = [
        'add' =>['title'],
        'edit' =>['id','title']
    ];
}